/*
  This file is part of Open-Doors.

  Open-Doors is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.
  
  Open-Doors is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with Open-Doors.  If not, see <http://www.gnu.org/licenses/>.

  Authors: Rune Thorbek & Araz B. Makoo
*/ 

Ext.define('OpenDoors.view.Viewport', {
    extend: 'Ext.container.Viewport',
    layout: 'fit',
    autoScroll:true,
    id: 'viewport_view',
    //minHeight: 300,
    //minWidth: 1000,
    
    requires: [
        'OpenDoors.view.MenuList',
	'OpenDoors.view.AdministrationView',
	'OpenDoors.view.IndsamlereView',
	'OpenDoors.view.GrupperView',
	'OpenDoors.view.RuterView',
	'OpenDoors.view.VenuesView',
	'OpenDoors.view.KampagnerView'
    ],
    
    initComponent: function() {
        this.items = {
            dockedItems: [{
                dock: 'top',
                xtype: 'toolbar',
	        style: 'background:white; border:none',
		
	        align: 'center',
		
                items: [
                    { xtype: 'tbfill'},
		    {
			xtype: 'component',
			height: 65,
			flex: 1,
			html: '<a href="main_page.php"><img src="open_doors_logo.png"/></a>',
                    },
		    { xtype: 'tbfill'}]
            }],
            layout: {
                type: 'hbox',
                align: 'stretch'
            },
            items: [{
                width: 180,
		height: 500,
                xtype: 'panel',
                layout: {
                    type: 'vbox',
                    align: 'stretch'
                },
                items: [{
                    xtype: 'menulist',
		    id: 'menulist_grid',
                    flex: 1
                }]
            }, {
                xtype: 'container',
                flex: 1,
                border: false,
                layout: {
                    type: 'vbox',
                    align: 'stretch'
                },
                items: [{
		    xtype: 'indsamlerview',
		    id: 'indsamlere_view_panel',
		    hidden: true,
                    flex: 1
		}, {
		    xtype: 'gruppeview',
		    id: 'grupper_view_panel',
		    hidden: true,
                    flex: 1
		}, {
		    xtype: 'ruteview',
		    id: 'ruter_view_panel',
		    hidden: true,
                    flex: 1
		}, {
		    xtype: 'venueview',
		    id: 'venues_view_panel',
		    hidden: true,
                    flex: 1
		}, {
		    xtype: 'administrationview',
		    id: 'administration_view_panel',
		    hidden: true,
		    flex: 1
		}, {
		    xtype: 'kampagneview',
		    id: 'kampagner_view_panel',
		    hidden: true,
		    flex: 1
		}
			
		       ]
		
            }]
        };
        
        this.callParent();
    }
});

